public class ch09 {
    public static void main(String[] args) {
        String str = "azbaccdeff";
        str.length();
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            boolean flag = false;
            for (int j = i+1; j < str.length(); j++) {
                char c1 = str.charAt(j);
                if (c == c1){
                    flag = true;
                    break;
                }
            }
            if (!flag){
                System.out.println("字符" + c + "是第一次出现的");
                break;
            }
        }
    }
}
